<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>实现三栏水平布局之绝对定位布局</title>
    <style type="text/css">
    *{
            margin: 0;
            padding: 0;
        }
        .wrap{
            width: 100vw;
        }
    .header,.footer { 
        width: 100%;
        height: 50px;
        background:rgb(156, 148, 148);
    }
    .container{
        position: relative;
    }
    .main{
        height: 130px;
        margin: 0 200px;
        background-color: blue;
    }
    .left,.right{
        top: 0;
        height: 130px;
        position: absolute;
        width: 200px;
        background-color: green;
    }
    .left{left: 0;}
    .right{right: 0;}
    </style>
</head>
<body>
    <div class="header"></div>
    <div class="container"> 
             <!-- 绝对定位 -->
　　        <div class="main">绝对定位</div> 
　　        <div class="left">广告</div> 
            <!-- 弹性布局 -->
            <!-- <div class="detail">弹性布局</div>   -->
　　        <div class="right">广告</div> 
    </div>
    <div class="footer"></div>
</body>
</html>